<template>
  <template v-for="item in arrList">
    <el-menu-item :index="item.path" v-if="!item.children.length">{{
      item.meta.title
    }}</el-menu-item>
    <el-submenu :index="item.path" v-else>
      <template #title>{{ item.meta.title }}</template>
      <el-menu-item
        v-for="child in item.children"
        :index="item.path + '/' + child.path"
        >{{ child.meta.title }}</el-menu-item
      >
    </el-submenu>
  </template>
</template>
<script setup lang="ts">
import { defineProps } from "vue";
const prop = defineProps({
  arrList: {
    type: Object,
    default: {},
  },
});
</script>
